<template>
  <div>
    <input type="checkbox" value="科幻" v-model="checkedNames" />
    <label for="jack">科幻</label>
    <input type="checkbox" value="喜剧" v-model="checkedNames" />
    <label for="john">喜剧</label>
    <input type="checkbox" value="动漫" v-model="checkedNames" />
    <label for="mike">动漫</label>
    <input type="checkbox" value="冒险" v-model="checkedNames" />
    <label for="mike">冒险</label>
    <input type="checkbox" value="科技" v-model="checkedNames" />
    <label for="mike">科技</label>
    <input type="checkbox" value="军事" v-model="checkedNames" />
    <label for="mike">军事</label>
    <input type="checkbox" value="娱乐" v-model="checkedNames" />
    <label for="mike">娱乐</label>
    <input type="checkbox" value="奇闻" v-model="checkedNames" />
    <label for="mike">奇闻</label>

    <ul>
      <li v-for="(item, index) in checkedNames" :key="index">{{ item }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      checkedNames: [],
    };
  },
};
</script>

<style></style>
